package com.xd.cloud.dao.core;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.xd.cloud.dao.BaseDao;
import com.xd.cloud.entity.core.Dic;

/**   
 * 功能描述：字典表Dao
 * @author: wangshanshan   
 * @date: 2017年12月13日 下午1:25:10 
 */
@Repository
public class DicDao extends BaseDao<Dic> {

	public List<Dic> getDisByType(String type){
		String hql = "from Dic where type = ? order by id asc";
		return find(hql, new Object[] { type });
	}
	
	
	public Dic getDisByType(String type,String key){
		String hql = "from Dic where type = ? and key = ?";
		return get(hql, new Object[] { type ,key});
	}
}
